<%@ page language="java" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib uri="/WEB-TAG/platForm.tld" prefix="PF"%>
<table id="dom_datagridactrutaskWaiting">
	<thead>
		<tr>
			<th data-options="field:'ck',checkbox:true"></th>
			<th field="TITLE" data-options="sortable:false" width="100">
				任务主题
			</th>
			<th field="NAME" data-options="sortable:false" width="80">
				任务名称
			</th>
			<th field="CTIME" data-options="sortable:false" width="80">
				任务创建时间
			</th>
			<th field="PRONAME" data-options="sortable:false" width="80">
				流程名称
			</th>
		</tr>
	</thead>
</table>
<script type="text/javascript">
	var url_searchActionactrutaskWaiting = "admin/ActRuTaskqueryWaitingAll.do";//查询URL
	var title_windowactrutaskWaiting = "用户任务";//功能名称
	var gridactrutaskWaiting;//数据表格对象
	var searchactrutaskWaiting;//条件查询组件对象
	var TOOL_BARactrutaskWaiting = [ {
		id : 'view',
		text : '认领',
		iconCls : 'icon-tip',
		handler : function() {
			var selectedArray = $(gridactrutaskWaiting).datagrid(
					'getSelections');
			if (selectedArray.length > 0) {
				$.messager.confirm("认领任务", "是否认领选中任务?", function(flag) {
					if (flag) {
						$.post("admin/ActRuTaskClaim.do" + '?ids='
								+ $.farm.getCheckedIds(gridactrutaskWaiting), {},
								function(flag) {
									if (flag.pageset.commitType == 0) {
										$(gridactrutaskWaiting)
												.datagrid('reload');
										$(gridactrutask).datagrid('reload');
									} else {
										var str = MESSAGE_PLAT.ERROR_SUBMIT
												+ flag.pageset.message;
										$.messager.alert(MESSAGE_PLAT.ERROR,
												str, 'error');
									}
								});
					}
				});
			} else {
				$.messager.alert(MESSAGE_PLAT.PROMPT, MESSAGE_PLAT.CHOOSE_ONE,
						'info');
			}
		}
	} ];
	$(function() {
		//初始化数据表格
		gridactrutaskWaiting = $('#dom_datagridactrutaskWaiting').datagrid( {
			url : url_searchActionactrutaskWaiting,
			fit : true,
			fitColumns : true,
			'toolbar' : TOOL_BARactrutaskWaiting,
			closable : true,
			checkOnSelect : true,
			striped : true,
			rownumbers : true,
			ctrlSelect : true
		});
	});
</script>




